//自定义对象很简单,直接给示例
var person = {
    name : "张三",
    age : 23,
    eat : function(){
        alert("干饭");
    }
};
alert(person.name);
alert(person.age);
person.eat();